 #!/bin/bash

set -e

USER=root
WINE_PYTHON_DIR=~/.wine64/drive_c/users/$USER/AppData/Local/Programs/Python/Python310
echo ${WINE_PYTHON_DIR}
if [ ! -d ${WINE_PYTHON_DIR} ]
then
    echo "No wine python installation. Please install wine+python by executing: wine-python-installer.sh"
    exit -1
fi

Xvfb :0 -screen 0 1024x768x16 &
jid=$!
DISPLAY=:0.0 WINEPREFIX=~/.wine64 wine cmd /c \ ${WINE_PYTHON_DIR}/Scripts/pip.exe $@